﻿<UserControl x:Class="SLExtensions.Showcase.PagePasswordBoxBinding"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:sle="clr-namespace:SLExtensions;assembly=SLExtensions"
    xmlns:ctl="clr-namespace:SLExtensions.Showcase.Controllers">
    <UserControl.DataContext>
        <ctl:PasswordBindingContext Text="Hello" />
    </UserControl.DataContext>
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.5*"/>
            <ColumnDefinition Width="0.5*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <TextBox Text="{Binding Text,Mode=TwoWay}" VerticalAlignment="Center" Margin="4"/>
        <PasswordBox Grid.Column="1" VerticalAlignment="Center" Margin="4"
                     sle:PasswordHelper.Text="{Binding Text,Mode=TwoWay}" />
        
        <TextBox IsReadOnly="True" AcceptsReturn="True" Grid.Row="1" Grid.ColumnSpan="2"
                 Text="&lt;PasswordBox xmlns:sle=clr-namespace:SLExtensions;assembly=SLExtensions sle:PasswordHelper.Text={Binding Text,Mode=TwoWay} /&gt;"
                 />
    </Grid>
</UserControl>
